package com.ccit.common.client;

import com.ccit.common.feign.FeignConfiguration;
import com.ccit.common.result.Result;
import com.ccit.model.User;
import com.ccit.model.vo.admin.AdminUpdateVo;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@Component
@FeignClient(value = "service-user", configuration = FeignConfiguration.class)
public interface UserClient {


//    @DeleteMapping("/user/InwardAdmin/remove/{name}")
//    Result removeAdminById(@PathVariable("name") String  name);
    @RequestMapping(value = "/user/InwardAdmin/remove/{name}", method = RequestMethod.DELETE)
    Result removeAdminById(@PathVariable("name") String  name);

//    @PutMapping("/user/InwardAdmin/updateInfo")
//    boolean updateAdminInfoByEmployee(@RequestBody AdminUpdateVo adminUpdateVo);
    @RequestMapping(value = "/user/InwardAdmin/updateInfo", method = RequestMethod.PUT)
    boolean updateAdminInfoByEmployee(@RequestBody AdminUpdateVo adminUpdateVo);


//    @GetMapping("/api/area/getById/{phone}")
//    public User getByPhone(
//            @ApiParam(value = "会员手机号",required = true)
//            @PathVariable String  phone);

    @RequestMapping(value = "/api/area/getById/{phone}", method = RequestMethod.GET)
    public User getByPhone(
            @ApiParam(value = "会员手机号", required = true)
            @PathVariable String phone
    );



}
